package com.yming.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        chatModel = "qwenChatModel",
        chatMemory = "chatMemory",
        chatMemoryProvider = "chatMemoryProvider",
        tools = "calculatorTools"
)
public interface SeparateChatAssistant {
//    @SystemMessage(fromResource = "my_prompt_template.txt")
//    String chat(@MemoryId String memoryId, @UserMessage String userMessage);

    /**
     * 如果有两个以上参数，必须使用@V注解
     **/
    @UserMessage("你是我的好朋友，请用粤语回答问题。{{message}}")
    String chat(@MemoryId String memoryId, @V("message") String message);

    @SystemMessage(fromResource = "my_prompt_template.txt")
    String chat2(@MemoryId String memoryId,
                 @UserMessage String userMessage,
                 @V("username") String username,
                 @V("age") int age);

    @SystemMessage("你是“名侦探柯南”中的工藤新一，精通数学，请用工藤新一的口吻回答问题。")
    String chat3(@MemoryId String memoryId, @UserMessage String message);
}
